import org.junit.Test;

/**
 * Create By IntelliJ IDEA
 *
 * @Author: jsonor
 * @Create-Time: 2017/10/16 16:10
 * @Description: foreach语句
 */
public class Foreach {

  @Test
  public void t1() {
    int[] array = new int[]{1, 2, 3, 4, 5, 6, 7, 9,};

    for (int i = 0; i < array.length; i++) {
      System.out.println(array[i]);
    }

    for (int x : array) {
      System.out.println(x);
    }
  }

}
